<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
    <meta charset="UTF-8">
    <title>修改客户</title>
    <script type="application/javascript" th:src="@{/layui/layui.js}"></script>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
</head>
<body>
<form class="layui-form" action="/customer/updateCustomer" method="post">
    <div class="layui-form-item">
        <input type="hidden" name="id" th:value="${customer.getId()}">
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">联系人姓名</label>
        <div class="layui-input-block">
            <input type="text" name="receiverName" lay-verify="required" placeholder="联系人姓名" autocomplete="off" class="layui-input" th:value="${customer.getReceiverName()}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">客户地址</label>
        <div class="layui-input-inline">
            <textarea type="desc" name="addressDesc" placeholder="请输入描述" class="layui-textarea">[[${customer.getAddressDesc}]]</textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">邮编</label>
        <div class="layui-input-block">
            <input type="text" name="postCode" lay-verify="required" placeholder="请填入邮编" autocomplete="off" class="layui-input" th:value="${customer.getPostCode()}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">电话号码</label>
        <div class="layui-input-block">
            <input type="text" name="phone" lay-verify="required" placeholder="请填入联系人电话号码" autocomplete="off" class="layui-input" th:value="${customer.getPhone()}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">所属用户</label>
        <div class="layui-input-block">
            <select name="belongUser" lay-verify="" lay-search>
                <option th:each="user:${userList}" th:value="${user.getId}" th:selected="${customer.getBelongUser()==user.getId()?true:false}">[[${user.getUserName}]]</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
</body>
</html>